CC      = gcc
CXX     = g++
LINK    = g++
CFLAGS  = -g -Wall -O0
TARGET  = test 
SRCS    = $(wildcard *.cpp)
SRCS    += $(wildcard *.c)

#set your inc and lib  
INC = -I/root/thirdlib/boost_1_72_0
LIB = -std=c++11 -L/root/thirdlib/boost_1_72_0/stage/lib/ -lboost_date_time -lboost_thread -lboost_system -L/usr/lib/x86_64-linux-gnu/ -lpthread 

CXX_OBJS    = $(patsubst %.cpp, %.o, $(wildcard *.cpp))
C_OBJS  = $(patsubst %.c, %.o, $(wildcard *.c))

all:$(TARGET)

$(TARGET):$(CXX_OBJS) $(C_OBJS)
	$(LINK) $(CFLAGS) -o $@ $^ $(LIB)
%.o:%.cpp
	$(CXX) $(CFLAGS) $(INC) -c -o $@ $<
%.o:%.c
	$(CC) $(CFLAGS) $(INC) -c -o $@ $<
.PHONY:clean
clean:
	rm -rf *.o $(TARGET) $(CXX_OBJS) $(C_OBJS)